<template>
  <el-dialog :visible="value" :title="title" @close="closeHandler">
    <el-form :model="formData" :inline="true">
      <el-form-item label="框架协议号">
        <el-input v-model="data.id" placeholder="" />
      </el-form-item>
      <dictionary
        v-model="data.contractType"
        label="合同类型"
        code="CONTRACT_TYPE"
      />
    </el-form>
  </el-dialog>
</template>

<script>
import dictionary from '@/components/Dictionary'
export default {
  name: 'TableEdit',
  components: {
    dictionary
  },
  props: {
    title: {
      type: String,
      default: '详情'
    },
    value: {
      type: Boolean,
      default: false
    },
    data: {
      type: Object,
      default: null
    }
  },
  data() {
    return {
      formData: this.data
    }
  },
  methods: {
    closeHandler() {
      this.$emit('input', !this.value)
    }
  }
}
</script>

<style>

</style>
